Blockchain provides data storage in a decentralized fashion by keeping the data in a series of data blocks having precedence relationship between each other. The chain of blocks is maintained and updated by a network of blockchain nodes, which are also responsible for validating data under a consensus scheme. The stored data may include many data types, such as financial transactions among parties, historical access information, etc.
Many blockchains (e.g., the Ethereum blockchain) have enabled blockchain contracts (also referred to as smart contracts) that are executed through blockchain transactions. Blockchain transactions are signed messages originated by externally owned accounts (e.g., blockchain accounts), transmitted by the blockchain network, and recorded in the blockchain. The blockchain contracts may be written to achieve various functions, such as adding data to blockchain accounts, changing data in the blockchain, etc. Thus, the blockchain can be maintained and updated by executing various blockchain transactions.
In existing blockchain schemes, each blockchain node needs to execute the various blockchain transactions to maintain the blockchain. After a consensus is reached, all blockchain nodes need to execute the same transactions in an agreed order to keep local copies of the blockchain synchronized. Because each execution requires significant computing power, a lot of computing resources are consumed in repetitive computations. As the complexity of the blockchain transaction algorithm scales up, the redundancy issue will be even more significant. Further, as most blockchain transactions are constructed for individual needs and do not account for other contemporaneously executed blockchain transactions, the execution efficiency for these blockchain transactions is low.
For example, to create blockchain accounts, a client locally creates or retrieves each local account and creates a public/private key pair for the local account. Then, the client packs the public key and a corresponding target blockchain ID in a blockchain transaction in a blockchain transaction for blockchain account creation. As a result, only one blockchain account is created each time per local account per blockchain. Moreover, the client has to store and manage the created blockchain address, public-private keys, and blockchain ID for the each local account, which puts burden on the client for maintaining storage and security. Further, because the blockchain transaction is independently written by the client in a closed environment, a slight mistake may cause execution errors for the entire blockchain transaction and potentially incur a great financial loss. Without continuous resource investment, security protocols maintained by the client may become obsolete or outdated or harbor loopholes, which may lead to security breaches to the blockchain system.